module game
{
	export class ChatView extends eui.Component
	{
		private input:eui.TextInput;
		private userInput:eui.TextInput;
		private nameTxt:eui.Label;
		private roomTxt:eui.Label;

		private list:eui.List;
		private arr_lst:eui.ArrayCollection;

		public constructor()
		{
			super();
			this.skinName = "resource/game_skins/Chat.exml";

			this.addEventListener(egret.Event.COMPLETE,this.init,this);
		}

		protected init(): void
		{
			this.removeEventListener(egret.Event.COMPLETE,this.init,this);
			// this.input.textDisplay.multiline = true;
			// this.input.textDisplay.
			
			this.arr_lst = new eui.ArrayCollection();
			this.list.itemRenderer = ChatItem;
			this.list.dataProvider = this.arr_lst;

			this.arr_lst.addItem("a");
			this.arr_lst.addItem("a");
			this.arr_lst.addItem("a");
			this.arr_lst.addItem("a");
		}
	}
}